home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-02-09 | 2.0 KB | 60 lines | [TEXT/CWIE] |
- // ============================================================================
- // CDragAndDrop.h ©1995 J. Rodden, DD/MF & Associates. All rights reserved
- // ============================================================================
- // CDragAndDrop picks up drag manager handling where LDragAndDrop leaves off.
- // Everything necessary for a drag and droppable pane is encapsulated in this
- // class.
- // ============================================================================
-
- #pragma once
-
- #include "CDragItem.h"
-
- #include <LDragAndDrop.h>
- #include <LView.h>
-
- class LDragTask;
-
- class CDragAndDrop : public LDragAndDrop,
- public CDragItem {
-
- friend class CDragTask;
-
- public:
- CDragAndDrop(WindowPtr inMacWindow, LPane *inPane);
-
- protected:
- virtual Boolean ClickIsDragEvent(const SMouseDownEvent &inMouseDown, Rect* inRect = nil);
- virtual void CreateDragEvent(const SMouseDownEvent &inMouseDown, Rect* inRect = nil);
-
- virtual void SetLocalFrame();
-
- virtual Boolean ItemIsAcceptable( DragReference inDragRef, ItemReference inItemRef);
-
- virtual void LeaveDropArea (DragReference inDragRef);
- virtual void InsideDropArea( DragReference inDragRef);
- virtual void InsideDropArea( DragReference inDragRef, Point& theMouseLocation,
- Point& thePinnedLocation);
-
- virtual void ReceiveDragItem( DragReference inDragRef, DragAttributes inDragAttrs,
- ItemReference inItemRef, Rect& inItemBounds);
-
- virtual void ReceiveDragItem( DragReference inDragRef, ItemReference inItemRef,
- Size inDataSize, Boolean inCopyData,
- Boolean inFromFinder, Rect& inItemBounds);
-
- virtual void RemoveDragItem(const SMouseDownEvent &inMouseDown);
-
- Rect mLocalFrame;
- FlavorType mFlavorAccepted;
- long mFlavorSize;
- Boolean mHighlightDrag; // flag to highlight if dragged out and then back in
-
- private:
- Boolean DroppedInTrash(LDragTask* inDragTask);
- Boolean CheckForOptionKey( DragReference inDragRef);
- Boolean CheckIfViewIsAlsoSender( DragReference inDragRef);
- };
-
-
-